package day16_Runnable.demo02_Runnable;

//100张票
//3个窗口卖
//卖完了程序运行但不出票

public class sell票 implements Runnable{
    static int i=100;
    @Override
    public void run() {
        while (true){
            if (i>=1){
                System.out.println(Thread.currentThread().getName()+"卖了第"+i+"张票");
                i--;
            }
        }
    }
}
